import Main from "../layout/Main.vue";
/* 基本模块*/
import systemModule from "./modules/systemModule";
/* 企业模块 */
import emsModule from "./modules/emsModule";
/* App */
import appModule from "./modules/appModule";

export default [
    {
        /* 登录页面*/
        path: "/login",
        name: "login",
        meta: {
            title: "Login - 登录",
            hideInMenu: true
        },
        component: () => import("@/views/SystemModule/Login")
    },
    {
        /* 首页*/
        path: "/",
        name: "_home",
        redirect: "/home",
        meta: {
            hideInBread: true,
        },
        component: Main,
        children: [
            {
                path: "/home",
                name: "home",
                meta: {
                    title: "欢迎首页",
                    icon: "ios-home-outline"
                },
                component: () => import("@/views/SystemModule/Home")
            }
        ]
    },
    /* 用户 */
    {
        path: "/user",
        name: "user",
        meta: {
            title: "用户"
        },
        component: Main,
        children: [
            {
                path: "/user_settings",
                name: "user_settings",
                meta: {
                    title: "个人设置"
                },
                component: () => import("@/views/SystemModule/User/Settings")
            },
        ]
    },
    ...systemModule,
    ...emsModule,
    ...appModule,
    {
        path: '*',
        name: 'error_404',
        meta: {
            hideInMenu: true
        },
        component: () => import('@/views/SystemModule/Error-page/404.vue')
    }
];
